package com.sanctity.service.impl;

import com.sanctity.domain.Patient;
import com.sanctity.feign.vo.patient.PatientVo;
import com.sanctity.mapper.PatientMapper;
import com.sanctity.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/***
 * @belongsProject spring-cloud
 * @description <TODO description class purpose>
 * @author Sanct
 * @version 1.0.0
 * @create 2024/2/4 11:18
 **/
@Service
//@Transactional
public class PatientServiceImpl implements PatientService {
    @Autowired
    private PatientMapper patientMapper;
    @Override
    public PatientVo findPatientById(Long patId) {
        Patient byId = patientMapper.findById(patId);
        PatientVo patientVo = new PatientVo(byId.getPatId(), byId.getPatName(), byId.getPatRegno());
        return patientVo;
    }
}
